This invention relates generally to software browsers and editors and, more particularly, relates to opening a hypertext markup language (HTML) file in an application program used to create the HTML file while viewing the HTML file in a browser program.
Most electronic files created by an application program have an external identifier tag assigned by the particular application program that was used to create the electronic file. The external identifier tag, which identifies the format in which the electronic file is stored, is a separate indicator that is attached to the electronic file. Generally, there are numerous specific file formats, such as word processing, database, spreadsheet, and graphics files. These specific file formats contain specialized information that only the application, which was used to create the electronic files, can fully interpret. Therefore, it is important that the application program used to create the electronic file is able to recognize and open the electronic file.
One way to associate the electronic files with the application program that created them is to use extensions. Extensions are a set of predefined characters added to the file name by the application program. This method of associating an electronic file with an application program is used by many computer operating systems, such as the xe2x80x9cWINDOWS 98xe2x80x9d operating system manufactured by the Microsoft Corporation of Redmond, Wash. For example, if a spreadsheet program such as Microsoft Corporation""s xe2x80x9cEXCELxe2x80x9d program, is used to create an electronic spreadsheet file, the spreadsheet program appends the extension xe2x80x9c.XLSxe2x80x9d at the end of the filename each time the electronic file is saved to a disk. The .XLS extension indicates that the xe2x80x9cEXCELxe2x80x9d program was used to create the electronic spreadsheet file, and that the file is saved in an xe2x80x9cEXCELxe2x80x9d specific format. In this manner, the file is associated with the corresponding electronic spreadsheet program.
The use of file extensions has several benefits. First, the file extension allows the user to quickly identify the electronic files that are associated with a particular application when the user views a list of files contained within a directory or a folder. Second, and more importantly, the extension associates the electronic file with the particular application program which was used to create the file. The logical association, which is typically stored in a look-up table within the computer system or disk, allows simple, easy file management by the user.
For example, the user can open an electronic file by selecting the electronic file with a pointing device, such as a mouse. The computer operating system retrieves the extension, locates the extension in the look-up table stored in the computer system or disk, and retrieves and launches the associated application program using the electronic file as input.
Another method of associating an electronic file with an application program is to write an identifier tag within the electronic file to indicate which application program is associated with the electronic file. The identifier tag associates the format of the electronic file with a particular application and is stored within the electronic file itself. The logical association of the external identifier tag to the particular application is stored in a look-up table in the computer system or hard disk drive.
However, each prior method of file identification has the drawback that only one application program can be associated with an electronic file. Usually, this does not pose a problem to users because most electronic file operations can be performed by one application program. However, there are instances when an electronic file needs to be associated with two or more different application programs.
For example, if an electronic file is created using the xe2x80x9cEXCELxe2x80x9d spreadsheet program and is saved in a Hypertext Markup Language (HTML) format, the electronic file needs to be associated with two application programs. First, the electronic file needs to be associated with a browser application program, such as Microsoft""s Internet Explorer, so that the user can view the content of the HTML-formatted file. Second, the file needs to be associated with the xe2x80x9cEXCELxe2x80x9d program to allow the user to edit the content of the electronic file. Typically, the electronic file is associated with the application program capable of viewing the file format. In the example above, the application associated with the HTML file would be the browser application. This single association restriction can be frustrating and lead to problems for the user. If the user wishes to edit the file, the user must know which application program was used to create the electronic file. However, if the user forgets which application program was used to create the electronic file, or if the user is not the same person who created the electronic file, there may be no easy way to determine which application is associated with the electronic file. If the user wants to edit an electronic file but does not know which application program was used to create it, the user usually must attempt to open the electronic file in each computer application program on the computer operating system until the appropriate application program is found. This process can be time-consuming, inefficient, and frustrating. Thus, there is a need for an improved method to identify, open and edit an electronic file in an application program, which was used to create the file.
Prior attempts to solve this problem include designating a separate program as a default editor to edit the electronic file. That is, each time an edit command is executed by the user in regard to an electronic file, the electronic file is opened in the designated default editor. For example, a text editor may be designated as the default editor for HTML-formatted files. Therefore, when a user selects an HTML-formatted file to edit, the HTML-formatted file is opened in the text editor program, regardless of whether the file was created in a spreadsheet program or a word processing program. As a result, the user may not be able to edit files as they wish, if at all. Specifically, the user may not be able to edit an HTML-formatted file created using xe2x80x9cEXCELxe2x80x9d if the default editor is a text-editing program. This inability to edit the HTML file is a frustrating process that can lead to numerous errors.
Thus, there is a need in the art for a method of associating an electronic file with both the program used to view the file and with the program used to create the electronic file, so that a user can easily and quickly edit the electronic file.
The present invention meets the above-described needs in a software utility by allowing a user to edit an electronic file, having an application identification tag and content data, in a first application program while viewing the content data of the electronic file in a second application program that is capable of only viewing the content data of the electronic file.
Generally described, an edit command delegation (ECD) utility provides a user with the ability to edit an electronic file in a creator application program while the electronic file is open in a separate viewing application program operable only for viewing the electronic file. In response to a user input to edit the electronic file, the ECD utility opens the electronic file and reads an application identification tag contained within the content of the electronic file. The application identification tag identifies a creator application program, which was used to create the electronic file and is operable for editing the content data of the electronic file. Once the ECD utility reads the application identification tag, the ECD launches the creator application program. The ECD utility then causes the creator application program to open the electronic file. Once the electronic file is open, the content data is displayed in a window controlled by the creator application program to allow the user to edit the content data.
More specifically, in response to a user command to edit the content data of the electronic file, the ECD utility determines whether the electronic file contains a first application identification tag. The first application identification tag contains the identification of the creator application program stored in an existing standard format. Using a standard format for the storing the first application identification tag allows for the ECD utility to efficiently identify and retrieve the first application identification tag from the electronic file. If the ECD utility determines that the electronic file contains a first application identification tag, the ECD utility then determines whether the creator application is located on the computer system. Once the ECD utility determines that the creator application is located on the computer system, the ECD utility causes the electronic file to be opened in the creator application program and the content data displayed in a window controlled by the creator application program.
However, if the electronic file does not contain the first application identification tag, the ECD utility searches the electronic file for a second application identification that may identify the creator application. Normally, the second application tag is stored in a non-standard format, such as a text string which is difficult and time consuming to use to identify the creator application program. Therefore, if the ECD utility determines that the electronic file contains the second application identification tag, the ECD utility maps the non-standard formatted second application identification tag to the standard format, which the ECD utility can use to efficiently determine and locate the creator application program.
Once the ECD utility maps the second application identification tag to the creator application program, the ECD utility determines whether the creator application program is present on the computer system. If the creator application program is on the computer system, the electronic file in opened in the creator application program and the content data is displayed in the window. However, if the electronic file does not contain either of the two application identification tags or the creator application program is not located on the computer system, the ECD utility determines whether a default application program is registered to edit the content data of the electronic file. If the determination is made that a default application program is registered to edit the content data, the ECD utility launches the default application program. The default application program then displays the content data in a window controlled by the default application program.
However, if the determination is made that a default application program is not associated with the electronic file, the ECD utility launches an alternative default application program that is operable for editing the content data. The ECD then causes the alternative application program to open the electronic file and display the content data within a computer window controlled by the alternative application program.
The ECD utility may also install itself into a computer system. The ECD utility copies itself onto a hard drive within the computer system. The ECD utility then determines whether an entry associated with a default application program is stored in a first location in a computer system. If the entry exists in the first location, the ECD utility copies the entry to a second location in the computer system. Once the ECD utility has finished copying the entry to the second location, the ECD deletes the entry associated with the default application program from the first location in the computer system and places an entry associated with the ECD utility into the first location in the computer system.
The ECD utility may also open the electronic file using a uniform resource locator (URL) associated with the electronic file. The ECD first determines if a directory path tag is set in the file, which specifies the directory path to the original location of the electronic file. If the directory path tag is present, the ECD utility determines if the original file is currently open in the creator application program. If the electronic file is open in the creator application program, the ECD utility switches to the open file in the creator application program. If the electronic file is not open in the creator application program, the ECD utility passes the directory path to the creator application program to open the file. If the directory path is not set in the file, and the path of the file is not a URL, the ECD utility determines whether the creator application program is capable of opening a URL site. The ECD utility checks a Boolean value in a URL locator entry associated with the creator application program. If a URL locator entry contains the Boolean value xe2x80x9cTRUExe2x80x9d (typically denoted as a xe2x80x9c1xe2x80x9d or a xe2x80x9cYESxe2x80x9d text string), the ECD utility passes the URL associated with the electronic file to the creator application program to open the file. Otherwise, the ECD utility passes the directory path associated with the electronic file to the creator application program.
That the invention improves over the drawbacks of prior systems and accomplishes the advantages described above will become apparent from the following detailed description of the exemplary embodiments and the appended drawings and claims.